#include "ConditionImpl.h"

LangConditionImpl::LangConditionImpl()
{
}

LangConditionImpl::LangConditionImpl(const string& _lang)
	:lang(_lang)
{

}

LangConditionImpl::~LangConditionImpl()
{

}

Condition::ConditionType LangConditionImpl::getConditionType()const
{
	return Condition::SAC_LANG_CONDTION;
}

Condition* LangConditionImpl::Copy()const
{
	return new LangConditionImpl(lang);
}

const string* LangConditionImpl::getLang()const
{
	return &lang;
}

const string* LangConditionImpl::toString()const
{
	string* result = NULL;
	try
	{
		result = new string;
		result->append(":Lang(");
		result->append(lang);
		result->append(")");
	}catch(std::exception& e)
	{
		if(result)
			delete result;
		return NULL;
	}
	return result;
}
